<?php 

// Set the content-type
header('Content-type: image/png');

// Create the image
$im = imagecreatetruecolor(60, 60);

// Create some colors
$white = imagecolorallocate($im, 255, 255, 255); //imagealphablending( $im );
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 80, 80, $black);

// The text to draw
$text = 'A';
// Replace path by your own font path
$font = 'arial.ttf';

// Add some shadow to the text
//imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);

// Add the text
imagettftext($im, 54, 0, 7, 55, $white, $font, $text);

// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);

?>